<!DOCTYPE html>
<html lang="en">
<head th:include="certificateWeb/headFoot :: headerCss">
</head>
<link rel="stylesheet" href="/css/certificateWeb/workNews/workNews.css">
<body id="body">
<style>
    .font-bold {
        font-size: 14px;
        margin: 20px 0;
    }

    tr {
        border: 1px solid #999
    }

    td {
        padding: 10px;
        border-right: 1px solid #999
    }
</style>
<div th:include="certificateWeb/headFoot :: header"></div>
<main id="main">
    <section class="sec_1">
        <div class="div_1">
            <ul>
                <li class="this"><a href="/certificate/my">个人信息</a></li>
                <!-- <li><a href="/certificate/findApplyExam">报名记录</a></li> -->
                <li><a href="/certificate/infoRecordList">表单提交记录</a></li>
                <li><a href="/certificate/expertRecordList">专家申请记录</a></li>
                <li><a href="/certificate/stationRecordList">考核站点申请记录</a></li>
                <li><a href="/certificate/stationPxRecordList">培训基地申请记录</a></li>
                <li><a href="/certificate/gradeQuery">成绩查询</a></li>
                <li><a href="/certificate/message">消息中心</a></li>
                <li><a href="/certificate/mock?grade=2" target="_blank">幼儿照护初级模拟考试</a></li>
                <li><a href="/certificate/mock?grade=1" target="_blank">幼儿照护中级模拟考试</a></li>
                <li><a href="/certificate/mock?grade=0" target="_blank">幼儿照护高级模拟考试</a></li>
            </ul>
        </div>
        <div class="div_2">
            <label class="label_title">机构信息</label>
            <label style="float: right; font-size: 14px; margin:20px 25px 0 0">
                <a href="#">
                    <input type="hidden" th:value="${orgId}" id="orgId"/>
                    <input type="button" id="edit" value="编辑资料"
                           style="background: #ff751a;cursor: pointer; border: 0; color: white; width: 95px; height: 30px; border-radius: 3px"/>
                </a>
            </label>
            <hr/>
            <div class="dv_1 div_01" id="info" style="margin: 20px auto">
                <div style="margin-left: 20px; margin-right: 20px">
                    <h3>单位名称：<label id="orgName"></label></h3>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        考核站点名称：<label id="khdName"></label>
                    </span>
                    </p>
                    <!--<p class=" font-bold">
                    <span><i class="fa fa-circle text-warning"></i>
                        审核状态：<span style="" id="state"></span>
                    </span>
                    </p>
                    <p class="font-bold">
                    <span><i class="fa fa-circle text-warning"></i>
                        未通过原因：
                        <span></span>
                    </span>
                    </p>-->
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        已批准的考核计划（人）：<label id="num"></label>
                    </span>
                    </p>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        承诺书：<a style="width: 200px;color: #00a3ff" download id="cns">下载</a>
                    </span>
                    </p>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        印章：<img style="width: 200px" id="yz"/>
                    </span>
                    </p>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                            申请时间：<label id="create"></label>
                    </span>
                    </p>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        考评团队：
                          <input id="teamTxt" type="hidden"/>
                          <table id="team"></table>
                    </span>
                    </p>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        考评场地设备：
                           <input id="equipmentTxt" type="hidden"/>
                          <table id="equipment"></table>
                    </span>
                    </p>
                    <p class=" font-bold">
                    <span><i class="fa fa-circle text-success"></i>
                        实习就业单位：
                         <input id="employerTxt" type="hidden"/>
                          <table id="employer"></table>
                    </span>
                    </p>
                </div>
            </div>
        </div>
        <div style="clear: both"></div>
    </section>

</main>
<div th:include="certificateWeb/headFoot :: footer"></div>
</body>
<script type="text/javascript" src="/js/xlPaging.js"></script>
<script>

    ajaxToken("/certificate/selPersonOrg", "Post", {orgId: $('#orgId').val()}, function (res) {
        // console.log("info = ", res)
        $('#orgName').text(res.orgNews.name);
        $('#khdName').text("幼儿照护"+res.orgNews.name+"考核点");
        $('#num').text(res.orgNews.numberOfExaminees);
        $('#cns').attr("href" , res.orgRole.enclosure);
        $('#yz').attr("src" , res.orgNews.cachet);
        $('#create').text(res.orgNews.createrDate);

        //考评团队
        var teamTxt = JSON.parse(res.orgNews.team);
        var a = '<tr><td>序号</td><td>姓名</td><td>职称</td><td>职务</td><td>考评岗位</td><td>联系电话</td><td>备注</td></tr>';
        for (var i = 0; i < teamTxt.length; i++) {
            a += '<tr><td>' + parseInt(i + 1) + '</td><td>' + teamTxt[i].khName + '</td><td>' + teamTxt[i].jobName + '</td><td>' + teamTxt[i].position + '</td>' +
                '<td>' + teamTxt[i].kpPost + '</td><td>' + teamTxt[i].kpMobile + '</td><td>' + teamTxt[i].kpRemark + '</td></tr>'
        }
        $("#team").html(a);

        //考评场地设备
        var equipmentTxt = JSON.parse(res.orgNews.equipment);
        var b = '<tr><td>序号</td><td>场地</td><td>位置</td><td>设备及设施</td><td>说明</td></tr>';
        for (var i = 0; i < equipmentTxt.length; i++) {
            b += '<tr><td>' + parseInt(i + 1) + '</td><td>' + equipmentTxt[i].kpSite + '</td>' +
                '<td>' + equipmentTxt[i].college + '学院' + equipmentTxt[i].ridgepole + '栋' + equipmentTxt[i].classroomNum + '号</td>' +
                '<td>' + equipmentTxt[i].equiAndFacility + '</td><td>' + equipmentTxt[i].equiAndFacility + '</td></tr>'
        }
        $("#equipment").html(b);

        //实习就业单位
        var employerTxt = JSON.parse(res.orgNews.employer);
        var c = '<tr><td>序号</td><td>单位名称</td><td>单位负责人</td><td>联系电话</td><td>实习就业负责人</td><td>联系电话</td><td>拟招聘人数(人)</td><td>拟招聘岗位</td><td>薪酬(元)</td></tr>';
        for (var i = 0; i < employerTxt.length; i++) {
           c += '<tr><td>' + parseInt(i + 1) + '</td><td>' + employerTxt[i].dwName + '</td><td>' + employerTxt[i].dwUser + '</td><td>' + employerTxt[i].dwMobile + '</td>' +
                '<td>' + employerTxt[i].jyUser + '</td><td>' + employerTxt[i].jyMobile + '</td><td>' + employerTxt[i].zpNum + '</td>' +
                '<td>' + employerTxt[i].zpPost + '</td><td>' + employerTxt[i].emolument + '</td></tr>'
        }
        $("#employer").html(c);
    });


    $('#edit').click(function () {
        location.href='/certificate/editOrg?orgId='+$('#orgId').val();
    })

</script>
</html>